$def with (name)

$var title: Ladybug (code name: sauce)
<!-- <div id="display">$context.userName</div> -->
<section id="browser" data-current='/'>
	<div id="browser-extra">
		<div id="browser-location"></div>
		<div id="browser-global-actions">
			<a href="#upload-control" id="upload">Upload</a>
			<a href="#" id="new-folder">New folder</a>
			<a href="#" id="rec-bin">Recycle Bin</a>
			<input type="text" name="search" id="search" placeholder="Search Ladybug">
		</div>
	</div>
	<div id="browser-table-header">
		<div id="browser-actions">
			<ul>
				<li class="action"><button id="download">Download</button></li>
				<li class="action"><button id="delete">Delete</button></li>
				<li class="action"><button id="rename">Rename</button></li>
				<li class="action"><button id="move">Move</button></li>
				<li class="action"><button id="copy">Copy</button></li>
			</ul>
		</div>
		<div id="browser-sort">
			<a href="#" id="name-sorter">Name</a>
			<a href="#" id="kind-sorter">Kind</a>
			<a href="#" id="modified-sorter">Modified</a>
		</div>
	</div>
	<div id="browser-viewer">		
		<ul>			
		</ul>
	</div>	
</section>

<script type="text/x-jquery-tmpl" id="locationTemplate">
	{{if path == '/'}}
		<a href="/">Home</a>
	{{else}}
		<a href="$${path}">$${path.split('/').pop()}</a>
	{{/if}}
</script>
<script type="text/x-jquery-tmpl" id="fileTemplate">
	<li class="file" data-resource="$${path}" >
		<div class="filename">
			<div class="filename-view"><a href="$${path}">$${filename}</a></div>
			<input class="filename-edit" value="$${filename}">
		</div>
		<div class="kind">$${type}</div>
		<div class="modified">$${modTime}</div>			
	</li>
</script>
<script type="text/x-jquery-tmpl" id="uploadControlTemplate">
	<div id="upload-control" class="dialog" style="display:none">
		<h2>Upload to "$${name}"</h2>
		<div class = "dialog-browser">
		<ul id="upload-file-list"></ul>
		</div>		
		<div class="dialog-actions">
			<div id="fileinput-button">
				<button>Add Files</button>
				<input type="file" name="file" multiple>
			</div>
			<div class="done-button">
				<button>Done</button>
			</div>
		</div>	 	
	</div>
</script>

<script type="text/x-jquery-tmpl" id="uploadFileTemplate">
	<li class="upload-file">
		<div class="fileinfo">
			<div class="filename">$${name}</div>
			<div class="size">$${size}</div>
			<div class="destination">$${folder}</div>
			<div class="status"></div>
		</div>		
		<div class = "progress-bar"></div>			
	</li>
</script>
<script type="text/x-jquery-tmpl" id="directoryTemplate">
	<div id="directory" class="dialog" style="display:none">
		<h2>$${type} to ...</h2>
		<div class="dialog-browser"><ul id="tree" class="ztree" style="width:260px; overflow:auto;"></ul></div>
		<div class="dialog-actions">
			<div class= "cancle-button">
				<button>Cancle</button>
			</div>
			<div class="done-button">
				<button>Done</button>
			</div>
		</div>	
	</div>
</script>


